package io.terminus.spzx.common.config;

import io.terminus.spzx.common.interceptor.UserLoginAuthInterceptor;
import lombok.RequiredArgsConstructor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author lichunlong lcl253137@alibaba-inc.com
 * @desc WEB工程配置类
 * @date 2024-11-18
 */
@RequiredArgsConstructor
public class UserWebMvcConfiguration implements WebMvcConfigurer {

    private final UserLoginAuthInterceptor userLoginAuthInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(userLoginAuthInterceptor).addPathPatterns("/api/**");
    }
}
